<?php

if(!empty($_POST))
{
	$file = upload($_FILES['file']);
	$_POST['file'] = $file;
	$re = insert('banner', $_POST);
	if($re)
	{
		echo '添加成功';
		header('Refresh:1;index.php?a=admin&b=banner&c=index');
		die;
	}
	else
	{
		echo '添加失败';
		header('Refresh:1;index.php?a=admin&b=banner&c=add');
		die;
	}	
}


$ree = selectAll('banner_cate');
//$banner_cate = getcate($re);

include('app/admin/banner/html/add.html');
?>